package me.zixing.java.chapter03;

/**
 * Created by bingh on 2017/9/20.
 */
public class CRectangle {
    private int length;
    private int width;

    public CRectangle(int length, int width) {
        this.length = length;
        this.width = width;
    }

    //增加计算周长方法

    public long calculatePerimeter(){
        long perimeter = 2 * (this.length + this.width);
        return perimeter;
    }


    //增加计算面积方法

    public long calculateArea(){
        long area = this.length * this.width;
        return area;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }
}
